


 zinb ig_totairings  lnadj2010candex lnadj2010oppex incumb OPENSEAT oppexp new vulnerable ///
   partisangeneral quasipartisan polarization murder ///
   i.broad allspeech2 politregs2 partyregs2 SOLICIT anydq yespolit  ///
   advopins_ma2 discactions_ma2 jccc_strong ///
   yr2002 yr2004 yr2006 yr2008 if contested==1, inflate(lnadj2010candex incumb OPENSEAT new vulnerable partisangeneral quasipartisan polarization murder ///
   i.broad  allregsall advopins_ma2 discactions_ma2 jccc_strong)   vce(cl statecode)
   outreg using "p:\Documents\table 5.3.doc", se starlevels(10 5 1) varlabels ///
    summstat(N\N_zero\N_clust\chi2\p\ll) summtitles (N\Zero Obs.\# Clusters\Wald chi2\Prob > chi2\Log pseudolikelihood) ///
 ctitles("", "Variable", "Model 1")  replace
 estimates store igzinb2
  
  zinb ig_totairings  lnadj2010candex lnadj2010oppex incumb OPENSEAT vulnerable ///
   partisangeneral quasipartisan polarization murder /// 
   allspeech2 politregs2 partyregs2 SOLICIT yespolit  ///
   advopins_ma2 discactions_ma2 jccc_strong ///
   yr2002 yr2004 yr2006 yr2008 if contested==1, inflate(lnadj2010candex incumb OPENSEAT new vulnerable ///
   partisangeneral quasipartisan polarization murder /// 
   allregsall yespolit  ///
    advopins_ma2 discactions_ma2 jccc_strong)   vce(cl statecode)
outreg using "p:\Documents\table 5.3.doc", se starlevels(10 5 1) varlabels ///
 summstat(N\N_zero\N_clust\chi2\p\ll) summtitles (N\Zero Obs.\# Clusters\Wald chi2\Prob > chi2\Log pseudolikelihood) ///
ctitles("", "Variable", "Model 2")  merge
 estimates store igzinb3
  
  
 zinb ig_totairings  lnadj2010candex lnadj2010oppex incumb OPENSEAT vulnerable ///
   allspeech2 politregs2 partyregs2 SOLICIT yespolit  ///
   advopins_ma2 discactions_ma2 jccc_strong ///
   yr2002 yr2004 yr2006 yr2008 if contested==1, inflate(lnadj2010candex incumb OPENSEAT new vulnerable ///
   allregsall yespolit  ///
    advopins_ma2 discactions_ma2 jccc_strong)   vce(cl statecode)
outreg using "p:\Documents\table 5.3.doc", se starlevels(10 5 1) varlabels ///
 summstat(N\N_zero\N_clust\chi2\p\ll) summtitles (N\Zero Obs.\# Clusters\Wald chi2\Prob > chi2\Log pseudolikelihood) ///
ctitles("", "Variable", "Model 3")  merge
 estimates store igzinb4
  
  
zinb ig_totairings  lnadj2010candex lnadj2010oppex incumb OPENSEAT   vulnerable ///
   allspeech2 politregs2 partyregs2 SOLICIT yespolit  ///
   advopins_ma2 discactions_ma2 jccc_strong ///
   yr2002 yr2004 yr2006 yr2008 if contested==1, inflate(lnadj2010candex incumb OPENSEAT new vulnerable ///
   allspeech2 politregs2 partyregs2 SOLICIT yespolit  ///
    advopins_ma2 discactions_ma2 jccc_strong)   vce(cl statecode)
outreg using "p:\Documents\table 5.3.doc", se starlevels(10 5 1) varlabels ///
 summstat(N\N_zero\N_clust\chi2\p\ll) summtitles (N\Zero Obs.\# Clusters\Wald chi2\Prob > chi2\Log pseudolikelihood) ///
 	   title("Zero-inflated Negative Binomial Results"\"Number of Interest Group Ads Supporting Candidate"\"Contested elections 2002-2010"\"Robust s.e. clustered on state") /// 
 ctitles("", "Variable", "Model 4")  merge
 estimates store igzinb5
  
  
  
  
  estimates restore igzinb4
  
  margins, at(allspeech2=(0 1 2 3)) atmeans predict(ir)
marginsplot
graph save "p:\Documents\fig 5.1 speech canons.gph", replace

  estimates restore igzinb4

  margins, at(politregs2=(0 1 2 3 4)) atmeans predict(ir)
marginsplot
graph save "p:\Documents\fig 5.1 polit canons.gph", replace  
  


marginscontplot discactions_ma2, ci
graph save "p:\Documents\fig 5.1 discactions.gph"


graph combine "p:\Documents\fig 5.1 speech canons.gph" ///
"p:\Documents\fig 5.1 polit canons.gph" ///
"p:\Documents\fig 5.1 discactions.gph", ///
row(2) col(2) altshrink ysize(8) xsize(8) saving("p:\Documents\fig 5.1.gph", replace)
graph export "p:\Documents\fig 5.1.tif", as(tif) width(1800) replace
